<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><#if op??><#if op="view">查看<#elseif op="edit">修改</#if><#else>新增</#if>支付方式</title>
	<link href="/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="place">
    	<span>位置：</span>
	    <ul class="placeul"><li><a href="/index.html">首页</a></li><li><#if op??><#if op="view">查看<#elseif op="edit">修改</#if><#else>新增</#if>支付方式</li></ul>
    </div>
    <br><br>
	<form action="/pay/method/save.html" method="post">
		<input name="id" type="hidden" value="${(method.id)!""}">
	    <ul class="forminfo">
		    <li>
		    	<label>名称：</label>
		    	<input name="name" type="text" class="scinput input-lg" value="${(method.name)!""}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" />
		    	<i><font class="font-red">*</font>支付方式名称</i>
		    </li>
		    <li>
		    	<label>图标：</label>
		    	<#if op?? && op="view">
		    	<div class="img_show_outer img_show_wapper" >
		    		<img src="${(method.icon)!"/images/no_pic.png"}">
		    	</div>
		    	<#else>
		    	<div class="img_show_outer img_show_wapper img_upload" id="uploadBtnOuter">
		    		<img src="/images/loading_1.gif" id="loadingImg" style="display: none; width: 32px; min-height: 32px; margin-top: 20px;">
		    		<span class="img_show_cover" id="uploadingBtn" style="display: none;">正在上传...</span>
		    		<img src="${(method.icon)!"/images/icon_add.png"}" id="addImg">
		    		<span class="img_show_cover" id="uploadBtn">上传</span>
		    	</div>
		    	<input name="file" id="file" type="file" class="scinput input-lg" style="display:none;"/>
		    	<input name="icon" type="hidden" value="${(method.icon)!""}"/>
		    	</#if>
		    	<i><font class="font-red">*</font>支付方式图标</i>
		    </li>
		    <li>
		    	<label>appid：</label>
		    	<input name="appId" type="text" class="scinput input-lg" value="${(method.appId)!""}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" />
		    	<i><font class="font-red">*</font>应用ID，由支付提供方给出</i>
		    </li>
		    <li>
		    	<label>商户号：</label>
		    	<input name="partner" type="text" class="scinput input-lg" value="${(method.partner)!""}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" />
		    	<i><font class="font-red">*</font>申请支付方式时由支付方给出</i>
		    </li>
		    <li>
		    	<label>签名：</label>
		    	<input name="sign" type="text" class="scinput input-lg" value="${(method.sign)!""}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" />
		    	<i><font class="font-red">*</font>申请支付方式时支付方给出</i>
		    </li>
		    <li>
		    	<label>&nbsp;</label>
		    	<#if !op?? || op!="view">
		    	<input id="submitBtn" type="button" class="btn" value="提交"/>&emsp;
		    	</#if>
		    	<input id="cancelBtn" type="button" class="btn" value="返回"/>
		    </li>
	    </ul>
	</form>
</body>
<script type="text/javascript" src="/js/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="/js/ext/ajaxfileupload.js"></script>
<script>
//  imgDir	上传文件目录编号，各自上传页面设定：1、广告；2、产品；3、帮助；4、分类推荐；9、其他
var imgDir = 9;
/**
 * 处理上传完成后的事情，上传方法在commonAdd.js
 * @param imgUrl
 */
function handleAfterUpload(imgUrl) {
	$("input[name='icon']").val(imgUrl);
	$("#addImg").attr("src", imgUrl);
}
</script>
<script type="text/javascript" src="/js/commonAdd.js"></script>
</html>